package com.sali.design_pattern.c_factory_method_pattern.lesson_03.controller;

import com.sali.design_pattern.c_factory_method_pattern.lesson_03.service.IUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: sali
 * @date: 2022/11/5 09:31.
 * @version: 1.0
 */
@RestController
public class UserController {

    //    @Resource(name = "userServiceImpl")
    private IUserService userService;

    @GetMapping("/buycourse")
    public String buyCourse() {
        Long courseId = 1L;
        Long userId = 1L;
        String result = userService.buyCourse(userId, courseId);
        return result;
    }


}
